package com.ruoyi.jacfile.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JacFileInfo;
import com.ruoyi.jacfile.mapper.JacFileInfoMapper;
import com.ruoyi.jacfile.service.IJacFileInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文件信息Service业务层处理
 *
 * @author wjy
 * @date 2020-06-19
 */
@Service
public class JacFileInfoServiceImpl implements IJacFileInfoService
{
    @Autowired
    private JacFileInfoMapper jacFileInfoMapper;

    /**
     * 查询文件信息
     *
     * @param fileid 文件信息ID
     * @return 文件信息
     */
    @Override
    public JacFileInfo selectJacFileInfoById(Long fileid)
    {
        return jacFileInfoMapper.selectJacFileInfoById(fileid);
    }

    /**
     * 查询文件信息列表
     *
     * @param jacFileInfo 文件信息
     * @return 文件信息
     */
    @Override
    public List<JacFileInfo> selectJacFileInfoList(JacFileInfo jacFileInfo)
    {
        return jacFileInfoMapper.selectJacFileInfoList(jacFileInfo);
    }

    /**
     * 新增文件信息
     *
     * @param jacFileInfo 文件信息
     * @return 结果
     */
    @Override
    public int insertJacFileInfo(JacFileInfo jacFileInfo)
    {
        return jacFileInfoMapper.insertJacFileInfo(jacFileInfo);
    }

    /**
     * 修改文件信息
     *
     * @param jacFileInfo 文件信息
     * @return 结果
     */
    @Override
    public int updateJacFileInfo(JacFileInfo jacFileInfo)
    {
        return jacFileInfoMapper.updateJacFileInfo(jacFileInfo);
    }

    /**
     * 删除文件信息对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteJacFileInfoByIds(String ids)
    {
        return jacFileInfoMapper.deleteJacFileInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除文件信息信息
     *
     * @param fileid 文件信息ID
     * @return 结果
     */
    public int deleteJacFileInfoById(Long fileid)
    {
        return jacFileInfoMapper.deleteJacFileInfoById(fileid);
    }
}
